/**
 * 
 */
package ufpr.mestrado.ais.base;

import jmetal.base.Problem;
import jmetal.base.Solution;

/**
 * @author bertol
 * 
 */
public class SolutionMNO extends Solution {

	/**
	 * 
	 */
	private static final long serialVersionUID = 2509959557564818851L;

	/**
	 * Stores the objectives values of the solution after sato calc.
	 */
	private double[] objectiveS_;

	/**
	 * Constructor.
	 * 
	 * @param problem
	 *            The problem to solve
	 * @throws ClassNotFoundException
	 */
	public SolutionMNO(Problem problem) throws ClassNotFoundException {
		super(problem);

		objectiveS_ = new double[problem_.getNumberOfObjectives()];

	} // Solutionmno

	/**
	 * Copy constructor.
	 * 
	 * @param solution
	 *            Solution to copy.
	 */
	public SolutionMNO(Solution solution) {
		super(solution);
		objectiveS_ = new double[problem_.getNumberOfObjectives()];
	}

	/**
	 * Sets the value of the i-th objective.
	 * 
	 * @param i
	 *            The number identifying the objective.
	 * @param value
	 *            The value to be stored.
	 */
	public void setObjectiveS(int i, double value) {
		objectiveS_[i] = value;
	} // setObjective

	/**
	 * Returns the value of the i-th objective.
	 * 
	 * @param i
	 *            The value of the objective.
	 */
	public double getObjectiveS(int i) {
		return objectiveS_[i];
	} // getObjective

}
